import request from '@/utils/request'

// 查询电力排放列表
export function listEmission(query) {
  return request({
    url: '/ele/emission/list',
    method: 'get',
    params: query
  })
}

// 查询电力排放详细
export function getEmission(id) {
  return request({
    url: '/ele/emission/' + id,
    method: 'get'
  })
}

// 新增电力排放
export function addEmission(data) {
  return request({
    url: '/ele/emission',
    method: 'post',
    data: data
  })
}

// 修改电力排放
export function updateEmission(data) {
  return request({
    url: '/ele/emission',
    method: 'put',
    data: data
  })
}

// 删除电力排放
export function delEmission(id) {
  return request({
    url: '/ele/emission/' + id,
    method: 'delete'
  })
}

// 导出电力排放
export function exportEmission(query) {
  return request({
    url: '/ele/emission/export',
    method: 'get',
    params: query
  })
}

// 保存上传数据
export function changeData(data) {
  return request({
    url: '/ele/emission/changeData',
    method: 'post',
    data: data
  })
}
